﻿
@using QDT.Common
@model QDT.Common.IPagedList<QDT.Core.Domain.PromoteMsg>
<div class="main_title">
    邮件列表
</div>
<div class="blank5">
</div>
<div class="button_row">
    @Html.ActionLink("新增", "AddMail", new { }, new { @class = "button" })
    <a href="javascript:;" class="button" onclick="deleteMethod('','DeleteMailForver')">彻底删除</a>

</div>
<div class="blank5">
</div>
<div class="grid_box">
    <div class="grid_top">
    </div>
    @Html.Grid(Model).Columns(column =>
                                  {
                                      column.CheckBox(x => x.ID);
                                      column.For(x => x.ID).Named("编号").HeaderAttributes(style => "width:50px;");
                                      column.For(x => x.Title).Named("邮件标题").SortColumnName("Title");
                                      column.For(x => x.SendTime.ToString("yyyy/MM/dd HH:mm:ss")).Named("发送时间").SortColumnName("SendTime");
                                      column.For(x => x.SendStatus.ToLocalizable()).Named("发送状态").SortColumnName("SendStatus");
                                      column.For(x => x.SmsType.ToDescription()).Named("邮件类型").SortColumnName("SmsType");
                                      column.For(x => x.SendType.ToDescription()).Named("发送方式").SortColumnName("SendType");
                                      column.Buttons(btns => btns.Add(x => Html.ActionLink("编辑", "EditMail", new { id = x.ID }))
                                                                 .Add(o => Html.ScriptLink("彻底删除", "deleteMethod({0},{1})", o.ID, "DeleteMailForver"))
                                                                 .Add(x => Html.ActionLink("查看队列", "PromoteQueueListByMsgId", "QueueManagment", new { msgId = x.ID },null)));
                                  }).Complex(ViewData)
    <div class="grid_foot">
    </div>
</div>
<div class="blank5">
</div>
@Html.Pager(Model)
